package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.provider.model.domain.Activity;
import com.weixing.mall.provider.api.model.enums.ActTypeEnum;
import com.weixing.mall.provider.model.query.ActivityQuery;
import com.weixing.mall.provider.model.vo.act.ActivityFormVo;
import com.weixing.mall.provider.model.vo.act.ActivityVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 促销模块-活动表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-16
 */
public interface ActivityMapper extends BaseMapper<Activity> {

    IPage<ActivityVo> findList(@Param("pg") Page page,@Param("qs") ActivityQuery query);

    List<ActivityVo> findMemberList(@Param("qs") ActivityQuery query);

    List<ActivityFormVo> selectActivityFormVoList(ActTypeEnum actTypeEnum);


    List<ActivityVo> selectAvailable();

    /**
     * 查询多久时间之内的活动列表
     * @return
     */
    List<ActivityVo> selectDataList(@Param("dataTime") Date dateTime,@Param("flag") Integer flag);

    List<ActivityVo> selectActList( Integer dateTime);

    List<ActivityVo> selectinvitedList(Date dateTime);

    IPage findFrontList(@Param("pg")Page initMpPage, @Param("qs")ActivityQuery query);
}
